package com.wondertek.poms.service.vo;

import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.*;
import javax.validation.groups.Default;

/**
 * @author:W5349
 * @date:2020/12/28
 */
@Data
public class CpInfoVo {

    private Long id;

    /* cp编号 */
    @NotNull(message = "cp编号不能为空",groups = {Default.class})
    @Digits(message = "cp编号长度不能超过19个字节",integer = 19,fraction = 0,groups = {Default.class, GroupType.Update.class})
    @Min(message = "cp编号不能为0或负数", value = 1)
    private Long cpId;

    /* cp名称 */
    @NotBlank(message = "cp名称不能为空", groups = {Default.class})
    @Length(message = "cp名称长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String cpName;

}
